{extend name="layout/main" /}

{block name="header"}

{/block}

{block name="content"}
<script src="__STATIC__/admin/js/laydate/laydate.js"></script>
<section class="panel">
    <header class="panel-heading">
        <h4>提现记录</h4>
    </header>
    <div class="panel-body" style="padding-bottom: 50px">
        <form class="form-horizontal" action="{:url('admin/wallet/withdrawal')}" >
            <div class="form-group">

                <div class="col-xs-1 no-pd-r">
                    <select name="type" class="form-control">
                        <option {if $Request.get.type == 'nick_name'} selected {/if} value="nick_name">用户名称</option>
                        <option {if $Request.get.type == 'mobile'} selected {/if} value="mobile">手机号</option>
                        <option {if $Request.get.type == 'id'} selected {/if} value="id">ID</option>
                    </select>
                </div>
                <div class="col-xs-3 no-pd-l">
                    <input type="text" value="{$Request.get.keyword}" name="keyword" class="form-control" placeholder="请输入关键词搜索">
                </div>
                <!--<div class="col-xs-2 no-pd-2">
                    <input type="text" value="{$Request.get.startTime}" name="startTime" id="startTime" class="form-control" placeholder="请输入开始时间">
                </div>
                <div class="col-xs-2 no-pd-2">
                    <input type="text" value="{$Request.get.endTime}" name="endTime" id="endTime" class="form-control" placeholder="请输入结束时间">
                </div>-->
                <button type="submit" class="btn btn-color">搜索</button>
            </div>
        </form>
        <table class="table table-bordered table-striped no-margin">
            <thead>
            <tr>
                <th class="text-center">ID</th>
                <th class="text-center">用户信息</th>
                <th class="text-center">支付宝/微信</th>
                <th class="text-center">提现数量</th>
                <th class="text-center">提现手续费</th>
                <th class="text-center">实际到账</th>
                <th class="text-center">提现至</th>
                <th class="text-center">审核状态</th>
                <th class="text-center">时间</th>
                <th class="text-center">操作</th>
            </tr>
            </thead>
            <tbody>
            {if $list}
            {foreach $list as $order}
            <tr>
                <td class="text-center">{$order->id}</td>
                <td class="text-center">
                    手机号：{$order.mobile}<br>
                    昵称：{$order->nick_name}
                </td>
                <td class="text-center">
                    微信姓名：{$order.wx}<br>
                    微信账号：{$order->wx_name}<br>
                    支付宝姓名：{$order.zfb}<br>
                    支付宝账号：{$order->zfb_name}<br>
                </td>
                <td class="text-center">
                    {$order->money}
                </td>
                <td class="text-center">
                    {$order->fee}
                </td>
                <td class="text-center">
                    {$order->money - $order->fee}
                </td>
                <td class="text-center">
                    {$order->to[$order.type]}
                </td>
                <td class="text-center">
                    {$order->status[$order.status]}

                </td>
                <td class="text-center">
                    {$order->createtime|date="Y-m-d H:i:s"}
                </td>
                <td class="text-center">
                    {if $order.status == 0}
                    <a data-url="{:url('wallet/checkwithdrawal',['id'=>$order->id,'status'=>1])}" onclick="main.ajaxDelete(this)" data-msg="确定要通过吗？" class="btn btn-xs btn-success">通过</a>
                    <a data-url="{:url('wallet/checkwithdrawal',['id'=>$order->id,'status'=>2])}" onclick="main.ajaxDelete(this)" data-msg="确定要拒绝吗？" class="btn btn-xs btn-danger">拒绝</a>
                    {/if}
                </td>
            </tr>
            {/foreach}
            {else /}
            <tr class="text-center">
                <td colspan="8">暂无数据</td>
            </tr>
            {/if}
            </tbody>
        </table>
        <div class="page">
            {:htmlspecialchars_decode($list->render())}
        </div>
    </div>
</section>
<script>
    laydate.render({
        elem: '#startTime',
        type: 'datetime'
    });
    laydate.render({
        elem: '#endTime',
        type: 'datetime'
    });
</script>
{/block}


{block name="footer"}

{/block}
